/*
package com.example.demo.config;


import com.example.demo.commen.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class TotalErrorReturn {
    @ResponseBody   //这个是必须加的，告诉spring要返回的是数据
    @ExceptionHandler
    public Result getFailed(Exception e){
        return Result.failed(e.getMessage());
    }
}
*/
